package com.boarsoft.boar.batch.service;

import com.boarsoft.bean.ReplyInfo;

/**
 * 批量执行指令服务
 *
 * @author tao.Wang57
 * @date 2024-01-08
 */
public interface BatchCmdService {

    /**
     * 暂停
     * <p>
     * STATUS_STOPPING = 6
     * STATUS_STOPPED = 7
     *
     * @return
     */
    public ReplyInfo<Object> pause(String id);

    /**
     * 暂停一批次
     * <p>
     * STATUS_STOPPING = 6
     * STATUS_STOPPED = 7
     *
     * @return
     */
    public ReplyInfo<Object> pause(String[] ids);

    /**
     * 取消
     * <p>
     * STATUS_CANCELING = 10
     * STATUS_CANCELED = 11
     *
     * @return
     */
    public ReplyInfo<Object> cancle(String id);

    /**
     * 取消一批次
     * <p>
     * STATUS_CANCELING = 10
     * STATUS_CANCELED = 11
     *
     * @return
     */
    public ReplyInfo<Object> cancle(String[] ids);

    /**
     * 续跑
     *
     * @param id
     * @return
     */
    public ReplyInfo<Object> resume(String id, String appName);

    /**
     * 重跑
     *
     * @param id
     * @return
     */
    public ReplyInfo<Object> redo(String id, String appName);

}
